Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Overloads Shared Function OnComplete( _ ByVal task As Task, _ ByVal onSuccess As Action, _ ByVal onFail As Action(Of Exception) _ ) As OperationResult |
Visual Basic (Usage) | ![]() |
---|---|
Dim task As Task Dim onSuccess As Action Dim onFail As Action(Of Exception) Dim value As OperationResult value = TaskExtensions.OnComplete(task, onSuccess, onFail) |
C# | |
---|---|
[ExtensionAttribute()] public static OperationResult OnComplete( Task task, Action onSuccess, Action<Exception> onFail ) |
C++/CLI | |
---|---|
[ExtensionAttribute()] public: static OperationResult^ OnComplete( Task^ task, Action^ onSuccess, Action<Exception^>^ onFail ) |
Parameters
- task
- The task representing the asynchronous operation.
- onSuccess
- A callback to be called if the task completed was successful.
- onFail
- A callback to be called if the task failed.
Return Value
OperationResult encapsulating the provided System.Threading.Tasks.Task.Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family